<extend name="Public/indexEdit"/>
	<block name="content">
		<!-- 轮播 -->
		<div class="banner" id="banner">
			<ul class="banner_parent clearfix" id="banner_parent">
				<!-- 轮播展示第一块内容 -->
				<php>$i = 0;</php>
				<foreach name="result_banner" key="key" item="value">
					<li class="fl">
						<a href="{$value.ad_link}"><img src="{$value.pic_url}" alt="{$value.id}"></a>
						<div class="banner_con_right fr">
							 <if condition="!empty($value['product'])">
								<foreach name='value.product' item="pro">
									<a href=""><img src="{$pro.pic_url}" alt="{$pro.title}"></a>
								</foreach>
							</if>
						</div>
					</li>
					<php>$i++;</php>
				</foreach>
			</ul>
			<!-- 轮播按钮 -->
			<div class="clearfix btn_parent" id="btn_parent">
				<a href="javascript:;" class="fl active"></a>
				<for start="1" name="value" end="$i">
					<a href="javascript:;" class="fl"></a>
				</for>
			</div>
		</div>
		<!-- 广告 -->
		<div class="advertisement_one">
			<div class="advertisement_con clearfix">
				<div class="advertisement_parent" id="advertisement_parent">
					<span class="advertisement_btn_top" id="advertisement_btn_top"> < </span>
					<ul class="clearfix">
						<foreach name="ads" key='key' item='value'>
							<li class="fl">
								<if condition="!empty($value['children'])">
									<foreach name="value.children" key='key' item='ad'>
										<a href="{$ad.ad_link}" class="fl"><img height="151" width="100%" src="{$ad.pic_url}" alt="{$ad.id}" title="{$ad.title}"/></a>
									</foreach>
								</if>
						</foreach>
					</ul>
					<span class="advertisement_btn_buttom" id="advertisement_btn_buttom">></span>
				</div>
			</div>
		</div>
		<!-- 楼层内容 -->
		<if condition ="!empty($product)">
			<foreach name="product" key="key" item="value">
				<div class="groundfloor_con data-slide" data-title="{$key+1}">
					<!-- 1F导航 -->
					<div class="groundfloor" id="groundfloor_one">
						<div class="groundfloor_center clearfix">
							<div class="fl clearfix groundfloor_top">
								<h1 class="fl"><img alt="" src="__PUBLIC__/Home/img/index/{$key+1}.jpg" >{$key+1}F</h1>
								<h2 class="fl" number = '{$key}'>{$value.class_name}</h2>
								<h3 class="fl">{$value.description}</h3>
							</div>
							<ul class="fr clearfix groundfloor_fr">
								<foreach name="value.children" key='children' item="childrenType">
									<li class="fl"><a href="{:U('Goods/goods')}?class_id={$childrenType.id}">{$childrenType.class_name}</a></li>
								</foreach>
							</ul>
						</div>
					</div>
					<!-- 内容 -->
					<ul class="groundfloor_con_center clearfix" id="groundfloor_con_center">
						<foreach name="value.product" key="good" item="pro">
							<li class="fl">
								<a href="{:U('Goods/goods_details')}?id={$pro.id}">
									<div class="groundfloor_con_img">
										<img src="{$pro.pic_url}" alt="" width="130" height="130">
									</div>
									<p>{$pro.title}</p>
									<p>{$pro.description}</p>
									<p>￥{$pro.price_old}</p>
								</a>
								<span></span>
							</li>
						</foreach>
					</ul>
				</div>
				<if condition="($key+1) % 2 ==0">
					<!-- 广告 -->
					<div class="twowide clearfix">
						<php>$ad_data = 'ad_'.($key+1);</php>
						<volist name="$ad_data" id="adInfo">
							<a href="{$adInfo.ad_link}"><img alt="{$adInfo.title}"  width="400" height="126" src="{$adInfo.pic_url}"></a>
						</volist>
					</div>
				</if>
		  </foreach>
		 </if>
	</section>

</block>